Discover gists
Ultra-compact sprite rendering code with example frame animation logic. This release contains tech bits from the upcoming SuperNeo™ 2D game engine and includes rotation, anchor/pivot point, color filtering, alpha blending and built-in antialiased point sampling. As usual: complete, runnable single-function app. ~150 LOC. No modern C++, OOP or (other) obscuring cruft.
Sprites are rendered back-to-front (AKA "painter's algorithm") in the order they are submitted, as one draw call. The provided setup employs a single texture atlas containing all the sprite graphics.
The renderer is "im
/* | |
Delta Compression by Glenn Fiedler. | |
This source code is placed in the public domain. | |
http://gafferongames.com/2015/03/14/the-networked-physics-data-compression-challenge/ | |
*/ | |
#include <stdint.h> | |
#include <stdio.h> | |
#include <assert.h> | |
#include <string.h> |
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL |
#Define variables | |
$currentUser = (Get-CimInstance Win32_ComputerSystem).Username -replace '.*\\' | |
$localAdministrators = @("[YourGlobalAdminRoleSid]","[YourDeviceAdminRoleSid]") #Adjust to your local administrators | |
try { | |
$administratorsGroup = ([ADSI]"WinNT://$env:COMPUTERNAME").psbase.children.find("Administrators") | |
$administratorsGroupMembers = $administratorsGroup.psbase.invoke("Members") | |
foreach ($administratorsGroupMember in $administratorsGroupMembers) { | |
$administrator = $administratorsGroupMember.GetType().InvokeMember('Name','GetProperty',$null,$administratorsGroupMember,$null) | |
if (($administrator -ne "Administrator") -and ($administrator -ne $currentUser)) { |
Make sure you have WSL with the Windows 10 Fall Creators Update installed. Ranger uses rifle
as a file handler
and you need its config file, rifle.conf
. If you dont have it (should be in ~/.config/ranger/rifle.conf
), run
the command ranger --copy-config=rifle
, then edit the resulting file.
To run Windows applications from Ranger, we will use cmd.exe /C start "" <file>
, which works after the Fall
Creators Update. The problem is that Ranger will feed in file paths using Unix pathing, but start
expects Windows
pathing. We will solve this by using sed
to translate the path.
Add below code to your rifle.conf
and you will be able to run Windows applications for the chosen file extensions.
#region [Copyright (c) 2015 Cristian Alexandru Geambasu] | |
// Distributed under the terms of an MIT-style license: | |
// | |
// The MIT License | |
// | |
// Copyright (c) 2015 Cristian Alexandru Geambasu | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
// and associated documentation files (the "Software"), to deal in the Software without restriction, | |
// including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
// | |
// VideoMediaInput.swift | |
// GenerateMetal-iOS | |
// | |
// Created by Omar Juarez Ortiz on 2018-11-28. | |
// Copyright © 2018 All rights reserved. | |
// | |
import Foundation | |
import UIKit |
I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:
Do consider to STAR, if it helped you.
London
This Python scripts allows you to move your passwords from BitWarden to Apple iCloud.
You need to know:
- It ignores secure notes, credit cards and other types that are not passwords.
- It ignores BitWarden entries without usernames, passwords and URLs.
- It also ignores URLs that do not start with
http://
orhttps://
. - It normalizes all TOTP tokens, e.g.
wskg vtqa h5kl bhb4 v4v2 ybyo woc6 qme2
will be converted tootpauth://totp/example.com:dude@foo.bar?secret=WSKGVTQAH5KLBHB4V4V2YBYOWOC6QME2&issuer=example.com&algorithm=SHA1&digits=6&period=30
.